# try的嵌套
try:
    try:
        try:
            result = 1 / int(input('num:'))
        except ZeroDivisionError:
            print('输入的数字不能是0')
    except NameError:
        print('nameError')
except ValueError:
    print('传入的不能是非数字')